<div class="fade-animate" ng-if="mode(['add', 'update'])">
	<div class="panel panel-default panel-tab">
		<div class="panel-body">
			<form name="nsForm" id="article-data-form" action="#" method="post" class="form-horizontal form-wx" novalidate>
				<div class="form-group" ng-class="hasError(nsForm.title)">
					<label for="title" class="col-sm-2 control-label"><strong>*</strong>图文标题</label>
					<div class="col-sm-4">
						<input id="title" name="title" type="text" class="form-control" ng-model="article.title" required>
						<p class="help-block fade-animate" ng-if="isError(nsForm.title, 'required')"><i class="fa fa-exclamation-triangle"></i> 请填写图文标题~</p>
					</div>
				</div>
				<div class="form-group">
					<label for="author" class="col-sm-2 control-label">图文作者</label>
					<div class="col-sm-3">
						<input id="author" name="author" type="text" placeholder="（选填）" class="form-control" ng-model="article.author">
					</div>
				</div>
				<div class="form-group" ng-class="hasError(nsForm.description)">
					<label for="description" class="col-sm-2 control-label"><strong>*</strong>概述</label>
					<div class="col-sm-6">
						<textarea id="description" name="description" rows="2" class="form-control" ng-model="article.description" required></textarea>
						<p class="help-block fade-animate" ng-if="isError(nsForm.description, 'required')"><i class="fa fa-exclamation-triangle"></i> 请填写图文概述~</p>
					</div>
				</div>
				<div class="form-group" ng-class="hasError(nsForm.picUrl)">
					<label for="picUrl" class="col-sm-2 control-label"><strong>*</strong>图片</label>
					<div class="col-sm-6">
						<input id="picUrl" name="picUrl" type="hidden" value="{{article.picUrl}}" ng-model="article.picUrl" required>
						<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-popover" ng-click="modal('@{Resources.image_popover('setArticlePicUrl')}')">从图片库选择</button><br>
						<p class="help-block fade-animate" ng-if="article.picUrl"><img alt="" class="thumbnail thumbnail-wx-h200" ng-src="{{article.picUrl}}"></p>
						<p class="help-block fade-animate" ng-if="isError(nsForm.picUrl, 'required')"><i class="fa fa-exclamation-triangle"></i> 请选择图片~</p>
					</div>
				</div>
				<div class="form-group">
					<label for="text" class="col-sm-2 control-label"><strong>*</strong>图文内容</label>
					<div class="col-sm-8">
						<ueditor name="text" home="@{'/public/ueditor'}" bind="article.text" height="200"></ueditor>
					</div>
				</div>
				<div class="form-group">
					<div class="col-sm-10 col-sm-offset-2">
						<input name="id" value="{{article.id}}" type="hidden">
						<button type="button" class="btn btn-success" ng-click="save()" ng-disabled="btnDisabled(nsForm)">&{'app.common.button.save'}</button>
						<button type="button" class="btn btn-default" ng-click="cancel()">&{'app.common.button.cancel'}</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
